package versi.vitro.oaiserviceprovider.xml;

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;

import org.testng.annotations.Test;

public class InputTest {
    
    @Test
    public void testGetStringData() throws IOException {

	final String dummyInputy = "any old thing";
	
  	final InputStream inputStream = new ByteArrayInputStream(dummyInputy.getBytes());

  	String publicId = "used a bit";
  	String systemId = "http://www.versi.edu.au";	// The only thing we care about. Assumes a local web server is running
  	
  	Input input = new Input(publicId, systemId, inputStream); 	
  	String result = input.getStringData();
  	
  	assert result.equals(dummyInputy);
    }
}
